package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by WHH-PC on 2018/1/12.
 */
@Entity
@Table(name = "T_SYS_WECHAT_SHARE", schema = "oa", catalog = "")
public class WechatShareEntity extends BaseEntity{

    /**
     * 公司ID
     */
    private String companyId;

    /**
     * 分享日期
     */
    private String shareDate;

    /**
     * 分享名称
     */
    private String name;

    /**
     * 分享链接地址
     */
    private String linkUrl;

    /**
     * 分享图片地址
     */
    private String imageUrl;

    /**
     * 分享次数
     */
    private Integer forwardNumber;

    /**
     * 创建人
     */
    private String createUserId;

   /**
   *  备注
   */
    private String remark;
    /**
     * 上午是否分享
     */
    private Boolean morningFlag = false;

    /**
     * 中午是否分享
     */
    private Boolean noonFlag= false;

    /**
     * 晚上是否分享
     */
    private Boolean nightFlag= false;



    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getShareDate() {
        return shareDate;
    }

    public void setShareDate(String shareDate) {
        this.shareDate = shareDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getForwardNumber() {
        return forwardNumber;
    }

    public void setForwardNumber(Integer forwardNumber) {
        this.forwardNumber = forwardNumber;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Boolean getMorningFlag() {
        return morningFlag;
    }

    public void setMorningFlag(Boolean morningFlag) {
        this.morningFlag = morningFlag;
    }

    public Boolean getNoonFlag() {
        return noonFlag;
    }

    public void setNoonFlag(Boolean noonFlag) {
        this.noonFlag = noonFlag;
    }

    public Boolean getNightFlag() {
        return nightFlag;
    }

    public void setNightFlag(Boolean nightFlag) {
        this.nightFlag = nightFlag;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("COMPANY_ID", getCompanyId());
        obj.put("SHARE_DATE", getShareDate());
        obj.put("NAME", getName());
        obj.put("LINK_URL", getLinkUrl());
        obj.put("IMAGE_URL", getImageUrl());
        obj.put("FORWARD_NUMBER", getForwardNumber());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("REMARK",getRemark());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_SYS_WECHAT_SHARE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("COMPANY_ID", "companyId");
        obj.put("SHARE_DATE", "shareDate");
        obj.put("NAME", "name");
        obj.put("LINK_URL", "linkUrl");
        obj.put("IMAGE_URL", "imageUrl");        ;
        obj.put("FORWARD_NUMBER", "forwardNumber");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("REMARK","remark");
        return obj;
    }
}
